package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.ErrorInfoAddDTO;
import org.jsola.hr.dto.ErrorInfoUpdateDTO;
import org.jsola.hr.query.ErrorInfoQuery;
import org.jsola.hr.vo.ErrorInfoListVO;
import org.jsola.hr.vo.ErrorInfoVO;

import java.util.List;

/**
 * 异常记录表
 *
 * @author zhr
 */
@Api(tags = "hr-异常记录表")
public interface IErrorInfoControllerAPI {

    /**
     * 新增异常记录表
     * @param errorInfoAddDTO 异常记录表新增实体
     * @return 异常记录表展示对象
     */
    @ApiOperation(value = "新增异常记录表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "errorInfoAddDTO", dataType = "ErrorInfoAddDTO", value = "新增异常记录表", paramType = "body")
    })
    Result<ErrorInfoVO> save(ErrorInfoAddDTO errorInfoAddDTO);


    /**
     * 修改异常记录表
     * @param errorInfoUpdateDTO 异常记录表
     * @return 更新数量
     */
    @ApiOperation(value = "修改异常记录表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "errorInfoUpdateDTO", dataType = "ErrorInfoUpdateDTO", value = "修改异常记录表", paramType = "body")
    })
    Result<Integer> update(ErrorInfoUpdateDTO errorInfoUpdateDTO);




    /**
     * 删除单个异常记录表，彻底删除
     * @param errorInfoId 异常记录表id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个异常记录表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "errorInfoId", dataType = "String", value = "异常记录表id", paramType = "path")
    })
    Result<Integer> delete(String errorInfoId);


    /**
     * 批量删除异常记录表，彻底删除
     * @param errorInfoIds 异常记录表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除异常记录表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "errorInfoIds", dataType = "String[]", value = "异常记录表id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] errorInfoIds);


    /**
     * 根据异常记录表id查询异常记录表详情
     * @param errorInfoId 异常记录表id
     * @return 异常记录表详情
     */
    @ApiOperation(value="根据异常记录表id查询异常记录表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "errorInfoId", dataType = "String", value = "异常记录表id", paramType = "path")
    })
    Result<ErrorInfoVO> findById(String errorInfoId);


    /**
     * 查询异常记录表
     * @param errorInfoQuery 异常记录表查询参数
     * @return page
     */
    @ApiOperation(value="查询异常记录表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "errorInfoQuery", dataType = "ErrorInfoQuery", value = "异常记录表查询参数", paramType = "query")
    })
    Result<List<ErrorInfoListVO>> listAll(ErrorInfoQuery errorInfoQuery);


     /**
     * 分页查询异常记录表
     * @param errorInfoQuery 异常记录表查询参数
     * @return page
     */
    @ApiOperation(value="分页查询异常记录表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "errorInfoQuery", dataType = "ErrorInfoQuery", value = "异常记录表查询参数", paramType = "query")
    })
    Result<Page<ErrorInfoListVO>> page(ErrorInfoQuery errorInfoQuery);


}

